/*
 * XML Type:  PathNode
 * Namespace: http:///org/isistan/flabot/coremodel.ecore
 * Java type: org.isistan.flabot.coremodelEcore.PathNode
 *
 * Automatically generated - do not modify.
 */
package org.isistan.flabot.coremodelEcore.impl;
/**
 * An XML PathNode(@http:///org/isistan/flabot/coremodel.ecore).
 *
 * This is a complex type.
 */
public class PathNodeImpl extends org.isistan.flabot.coremodelEcore.impl.NoteElementModelImpl implements org.isistan.flabot.coremodelEcore.PathNode
{
    private static final long serialVersionUID = 1L;
    
    public PathNodeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName EXTENDEDDATA$0 = 
        new javax.xml.namespace.QName("", "extendedData");
    private static final javax.xml.namespace.QName PREVIOUS$2 = 
        new javax.xml.namespace.QName("", "previous");
    private static final javax.xml.namespace.QName NEXT$4 = 
        new javax.xml.namespace.QName("", "next");
    private static final javax.xml.namespace.QName PATH$6 = 
        new javax.xml.namespace.QName("", "path");
    private static final javax.xml.namespace.QName PREVIOUS2$8 = 
        new javax.xml.namespace.QName("", "previous");
    private static final javax.xml.namespace.QName NEXT2$10 = 
        new javax.xml.namespace.QName("", "next");
    private static final javax.xml.namespace.QName EXTENDEDDATA2$12 = 
        new javax.xml.namespace.QName("", "extendedData");
    private static final javax.xml.namespace.QName PATH2$14 = 
        new javax.xml.namespace.QName("", "path");
    
    
    /**
     * Gets array of all "extendedData" elements
     */
    public org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry[] getExtendedDataArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(EXTENDEDDATA2$12, targetList);
            org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry[] result = new org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "extendedData" element
     */
    public org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry getExtendedDataArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry target = null;
            target = (org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry)get_store().find_element_user(EXTENDEDDATA2$12, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "extendedData" element
     */
    public int sizeOfExtendedDataArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(EXTENDEDDATA2$12);
        }
    }
    
    /**
     * Sets array of all "extendedData" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setExtendedDataArray(org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry[] extendedDataArray)
    {
        check_orphaned();
        arraySetterHelper(extendedDataArray, EXTENDEDDATA2$12);
    }
    
    /**
     * Sets ith "extendedData" element
     */
    public void setExtendedDataArray(int i, org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry extendedData)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry target = null;
            target = (org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry)get_store().find_element_user(EXTENDEDDATA2$12, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(extendedData);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "extendedData" element
     */
    public org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry insertNewExtendedData(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry target = null;
            target = (org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry)get_store().insert_element_user(EXTENDEDDATA2$12, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "extendedData" element
     */
    public org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry addNewExtendedData()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry target = null;
            target = (org.isistan.flabot.coremodelEcore.EStringToEObjectMapEntry)get_store().add_element_user(EXTENDEDDATA2$12);
            return target;
        }
    }
    
    /**
     * Removes the ith "extendedData" element
     */
    public void removeExtendedData(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(EXTENDEDDATA2$12, i);
        }
    }
    
    /**
     * Gets array of all "previous" elements
     */
    public org.isistan.flabot.coremodelEcore.PathNode[] getPreviousArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(PREVIOUS2$8, targetList);
            org.isistan.flabot.coremodelEcore.PathNode[] result = new org.isistan.flabot.coremodelEcore.PathNode[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "previous" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode getPreviousArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().find_element_user(PREVIOUS2$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "previous" element
     */
    public int sizeOfPreviousArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PREVIOUS2$8);
        }
    }
    
    /**
     * Sets array of all "previous" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setPreviousArray(org.isistan.flabot.coremodelEcore.PathNode[] previousArray)
    {
        check_orphaned();
        arraySetterHelper(previousArray, PREVIOUS2$8);
    }
    
    /**
     * Sets ith "previous" element
     */
    public void setPreviousArray(int i, org.isistan.flabot.coremodelEcore.PathNode previous)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().find_element_user(PREVIOUS2$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(previous);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "previous" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode insertNewPrevious(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().insert_element_user(PREVIOUS2$8, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "previous" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode addNewPrevious()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().add_element_user(PREVIOUS2$8);
            return target;
        }
    }
    
    /**
     * Removes the ith "previous" element
     */
    public void removePrevious(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PREVIOUS2$8, i);
        }
    }
    
    /**
     * Gets array of all "next" elements
     */
    public org.isistan.flabot.coremodelEcore.PathNode[] getNextArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(NEXT2$10, targetList);
            org.isistan.flabot.coremodelEcore.PathNode[] result = new org.isistan.flabot.coremodelEcore.PathNode[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "next" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode getNextArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().find_element_user(NEXT2$10, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "next" element
     */
    public int sizeOfNextArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(NEXT2$10);
        }
    }
    
    /**
     * Sets array of all "next" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setNextArray(org.isistan.flabot.coremodelEcore.PathNode[] nextArray)
    {
        check_orphaned();
        arraySetterHelper(nextArray, NEXT2$10);
    }
    
    /**
     * Sets ith "next" element
     */
    public void setNextArray(int i, org.isistan.flabot.coremodelEcore.PathNode next)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().find_element_user(NEXT2$10, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(next);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "next" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode insertNewNext(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().insert_element_user(NEXT2$10, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "next" element
     */
    public org.isistan.flabot.coremodelEcore.PathNode addNewNext()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.PathNode target = null;
            target = (org.isistan.flabot.coremodelEcore.PathNode)get_store().add_element_user(NEXT2$10);
            return target;
        }
    }
    
    /**
     * Removes the ith "next" element
     */
    public void removeNext(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(NEXT2$10, i);
        }
    }
    
    /**
     * Gets array of all "path" elements
     */
    public org.isistan.flabot.coremodelEcore.Path[] getPathArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(PATH2$14, targetList);
            org.isistan.flabot.coremodelEcore.Path[] result = new org.isistan.flabot.coremodelEcore.Path[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "path" element
     */
    public org.isistan.flabot.coremodelEcore.Path getPathArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.Path target = null;
            target = (org.isistan.flabot.coremodelEcore.Path)get_store().find_element_user(PATH2$14, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "path" element
     */
    public int sizeOfPathArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PATH2$14);
        }
    }
    
    /**
     * Sets array of all "path" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setPathArray(org.isistan.flabot.coremodelEcore.Path[] pathArray)
    {
        check_orphaned();
        arraySetterHelper(pathArray, PATH2$14);
    }
    
    /**
     * Sets ith "path" element
     */
    public void setPathArray(int i, org.isistan.flabot.coremodelEcore.Path path)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.Path target = null;
            target = (org.isistan.flabot.coremodelEcore.Path)get_store().find_element_user(PATH2$14, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(path);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "path" element
     */
    public org.isistan.flabot.coremodelEcore.Path insertNewPath(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.Path target = null;
            target = (org.isistan.flabot.coremodelEcore.Path)get_store().insert_element_user(PATH2$14, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "path" element
     */
    public org.isistan.flabot.coremodelEcore.Path addNewPath()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.Path target = null;
            target = (org.isistan.flabot.coremodelEcore.Path)get_store().add_element_user(PATH2$14);
            return target;
        }
    }
    
    /**
     * Removes the ith "path" element
     */
    public void removePath(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PATH2$14, i);
        }
    }
    
    /**
     * Gets the "previous" attribute
     */
    public java.lang.String getPrevious2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PREVIOUS2$8);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "previous" attribute
     */
    public org.apache.xmlbeans.XmlString xgetPrevious2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(PREVIOUS2$8);
            return target;
        }
    }
    
    /**
     * True if has "previous" attribute
     */
    public boolean isSetPrevious2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(PREVIOUS2$8) != null;
        }
    }
    
    /**
     * Sets the "previous" attribute
     */
    public void setPrevious2(java.lang.String previous2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PREVIOUS2$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PREVIOUS2$8);
            }
            target.setStringValue(previous2);
        }
    }
    
    /**
     * Sets (as xml) the "previous" attribute
     */
    public void xsetPrevious2(org.apache.xmlbeans.XmlString previous2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(PREVIOUS2$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(PREVIOUS2$8);
            }
            target.set(previous2);
        }
    }
    
    /**
     * Unsets the "previous" attribute
     */
    public void unsetPrevious2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(PREVIOUS2$8);
        }
    }
    
    /**
     * Gets the "next" attribute
     */
    public java.lang.String getNext2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NEXT2$10);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "next" attribute
     */
    public org.apache.xmlbeans.XmlString xgetNext2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NEXT2$10);
            return target;
        }
    }
    
    /**
     * True if has "next" attribute
     */
    public boolean isSetNext2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(NEXT2$10) != null;
        }
    }
    
    /**
     * Sets the "next" attribute
     */
    public void setNext2(java.lang.String next2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NEXT2$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NEXT2$10);
            }
            target.setStringValue(next2);
        }
    }
    
    /**
     * Sets (as xml) the "next" attribute
     */
    public void xsetNext2(org.apache.xmlbeans.XmlString next2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NEXT2$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NEXT2$10);
            }
            target.set(next2);
        }
    }
    
    /**
     * Unsets the "next" attribute
     */
    public void unsetNext2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(NEXT2$10);
        }
    }
    
    /**
     * Gets the "extendedData" attribute
     */
    public java.lang.String getExtendedData2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXTENDEDDATA2$12);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "extendedData" attribute
     */
    public org.apache.xmlbeans.XmlString xgetExtendedData2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(EXTENDEDDATA2$12);
            return target;
        }
    }
    
    /**
     * True if has "extendedData" attribute
     */
    public boolean isSetExtendedData2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(EXTENDEDDATA2$12) != null;
        }
    }
    
    /**
     * Sets the "extendedData" attribute
     */
    public void setExtendedData2(java.lang.String extendedData2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXTENDEDDATA2$12);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(EXTENDEDDATA2$12);
            }
            target.setStringValue(extendedData2);
        }
    }
    
    /**
     * Sets (as xml) the "extendedData" attribute
     */
    public void xsetExtendedData2(org.apache.xmlbeans.XmlString extendedData2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(EXTENDEDDATA2$12);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(EXTENDEDDATA2$12);
            }
            target.set(extendedData2);
        }
    }
    
    /**
     * Unsets the "extendedData" attribute
     */
    public void unsetExtendedData2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(EXTENDEDDATA2$12);
        }
    }
    
    /**
     * Gets the "path" attribute
     */
    public java.lang.String getPath2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PATH2$14);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "path" attribute
     */
    public org.apache.xmlbeans.XmlString xgetPath2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(PATH2$14);
            return target;
        }
    }
    
    /**
     * True if has "path" attribute
     */
    public boolean isSetPath2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(PATH2$14) != null;
        }
    }
    
    /**
     * Sets the "path" attribute
     */
    public void setPath2(java.lang.String path2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PATH2$14);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PATH2$14);
            }
            target.setStringValue(path2);
        }
    }
    
    /**
     * Sets (as xml) the "path" attribute
     */
    public void xsetPath2(org.apache.xmlbeans.XmlString path2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(PATH2$14);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(PATH2$14);
            }
            target.set(path2);
        }
    }
    
    /**
     * Unsets the "path" attribute
     */
    public void unsetPath2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(PATH2$14);
        }
    }
}
